Skip to content

fix: restore BuiltBy=goreleaser ldflag in GoReleaser configs#27

Merged
miguelsanchez-upsun merged 1 commit intomainfrom
cli-115-restore-builtby-ldflag
Mar 12, 2026
Merged

fix: restore BuiltBy=goreleaser ldflag in GoReleaser configs#27
miguelsanchez-upsun merged 1 commit intomainfrom
cli-115-restore-builtby-ldflag

Conversation

@pjcdawkins
Copy link
Contributor

Summary

  • Restore the -X "...BuiltBy=goreleaser" ldflag that was removed in 73a97c7
  • Without it, GoReleaser-built binaries report "built ... by local" instead of "built ... by goreleaser"
  • Added to all 4 build entries in .goreleaser.yaml and both in .goreleaser.vendor.yaml.tpl

🤖 Generated with Claude Code

The BuiltBy ldflag was removed in 73a97c7 when switching to
runtime/debug for version info. Unlike Version, Commit, and Date,
BuiltBy has no source in runtime/debug and needs an explicit ldflag.

Without it, GoReleaser-built binaries incorrectly report
"built ... by local".

Closes [CLI-115: Restore BuiltBy=goreleaser ldflag in GoReleaser config](https://linear.app/platformsh/issue/CLI-115/restore-builtbygoreleaser-ldflag-in-goreleaser-config)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 12, 2026 15:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Restores the BuiltBy=goreleaser Go ldflag in GoReleaser configuration so GoReleaser-built binaries correctly report they were built by “goreleaser” (instead of the default “local”) when version --verbose is used.

Changes:

  • Add -X "github.com/upsun/cli/internal/config.BuiltBy=goreleaser" to all build entries in .goreleaser.yaml.
  • Add the same ldflag to both build entries in .goreleaser.vendor.yaml.tpl.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.goreleaser.yaml Restores BuiltBy=goreleaser ldflag across all GoReleaser build definitions.
.goreleaser.vendor.yaml.tpl Ensures vendor-template GoReleaser builds also set BuiltBy=goreleaser.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@miguelsanchez-upsun miguelsanchez-upsun merged commit 813e7be into main Mar 12, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants